import axios from '../util/request'
/*
  params: idArray
*/
export const getQuestion = data => axios({
  method: 'GET',
  url: '/a/u/test/detail',
  params: data
})

/*
  team 所在的分组
  params: team
*/
export const getIds = data => axios({
  method: 'GET',
  url: '/a/u/test/ids',
  params: data
})

/*
  查询用户词场活动信息
  url: /a/u/information
  params: token
*/
export const getUserInfo = data => axios({
  method: 'GET',
  url: '/a/u/information',
  params: data
})

/*
  查询用户词场活动信息
  url: /a/u/information
  params: token team
*/
export const signUp = data => axios({
  method: 'POST',
  url: '/a/u/information',
  data: data
})
/*
  查询当日以及总榜的答题正确数榜单
  url: /a/u/information
  params: page  size  type:0查询当日,1查询总榜
*/
export const getRankList = data => axios({
  method: 'GET',
  url: '/a/u/word/rank/list',
  params: data
})
/*
  减少用户当日可答题次数
  url: /a/u/chance
  params: page  size  type:0查询当日,1查询总榜
  method : PUT
*/
export const lessChance = data => axios({
  method: 'PUT',
  url: '/a/u/chance',
  params: data
})
/*
  查询用户的推荐人信息接口
  url: /a/u/recommend/information
  params: token
  method : GET
*/
export const getMyFriends = data => axios({
  method: 'GET',
  url: '/a/u/recommend/information',
  params: data
})
/*
  查询本人在榜单中的信息
  url: /a/u/word/rank/information
  params: token, type 0 为 日榜 , 1 为总榜
  method : GET
*/
export const checkMyselfRnak = data => axios({
  method: 'GET',
  url: '/a/u/word/rank/information',
  params: data
})
/*
  获取验证码接口
  url: /a/verification/code
  params: token, type 0 为 日榜 , 1 为总榜
  method : GET
*/
export const getCode = data => axios({
  method: 'POST',
  url: '/a/verification/code',
  data: data
})
/*
  注册接口
  url: /a/register
  params: token, type 0 为 日榜 , 1 为总榜
  method : GET
*/
export const signUpByTel = data => axios({
  method: 'POST',
  url: '/a/register',
  data: data
})
/*
  获取验证码接口
  url: /a/u/correct/practice
  params: token, correctNumber
  method : GET
*/
export const updateCorrectNum = data => axios({
  method: 'PUT',
  url: '/a/u/correct/practice',
  params: data
})
/*
  获取系统当前时间
  url http://test.etalk365.com:884/a/timestamp
*/
export const getNowTime = data => axios({
  method: 'GET',
  url: 'https://e.etalk365.com/a/timestamp',
  params: data
})
/*
  获取历史排行
  url /a/u/rank/record/list
  params: recordTime : 格式 yyyMMdd ,page , size
*/
export const getHistoryRank = data => axios({
  method: 'GET',
  url: '/a/u/rank/record/list',
  params: data
})
/*
  检测是否分享
  url /a/u/rank/record/list
  params: 1
*/
export const checkIfShare = data => axios({
  method: 'GET',
  url: '/a/u/information/share',
  params: data
})
/*
  分享增加次数
  url /a/u/rank/record/list
  params: 1
*/
export const addTimesByShare = data => axios({
  method: 'PUT',
  url: '/a/u/information/share',
  params: data
})
